---
title: Profiles
---
<h2>{{ page.title }}</h2>

<p>
  Profiles are small configuration units which can be merged into the overall
  configuration.
</p>

<p>
  The following is an example of starting heroic with an in-memory configuration
  using the shell, and the <code>memory</code> profile:
</p>

<pre><code class="language-bash">
$> tools/heroic-shell --server -P memory
</code></pre>

<p>
  A list of all available profiles and their options can be seen with the
  <code>--help</code> switch.
</p>

<p>
  Note: <code>-X elasticsearch.configure</code> will cause the temporary
  elasticsearch instances to be automatically configured.
</p>

<h3>Playing with the <code>memory</code> profile</h3>

<p>
  Using the <code>load-generated</code> command, you can generate some random
  data for the last week to play around with.
</p>

<pre><code class="language-bash">
heroic&gt; load-generated
...
</code></pre>

<p>
  You can also manually write some data into the the local instance:
</p>

<pre><code class="language-bash">
heroic&gt; write --series '{"key": "test", "tags": {"host": "a", "what": "foo"}}' -p 00:00=1 -p 00:01=2
heroic&gt; write --series '{"key": "test", "tags": {"host": "a", "what": "bar"}}' -p 00:00=3 -p 00:01=4
</code></pre>

<p>
  We can fetch the data back out:
</p>

<pre><code class="language-bash">
heroic&gt; fetch --series '{"key": "test", "tags": {"host": "a", "what": "bar"}}' --start 00:00 --end 00:02
</code></pre>

<p>
  We can also query the data:
</p>

<pre><code class="language-bash">
heroic&gt; query average from points(1d) where $key = test;
heroic&gt; query average from points(1d) where $key = test and what=bar;
</code></pre>
